# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=incron
pkgver=0.5.12
pkgrel=0
pkgdesc="Inotify cron system"
url="https://github.com/ar-/incron"
# riscv64 fails to build, "inotify-cxx.h:40:10: fatal error: sys/inotify-syscalls.h: No such file or directory"
arch="all !riscv64"
license="GPL-2.0"
makedepends="argp-standalone"
subpackages="$pkgname-doc $pkgname-openrc"
options="!check suid" # no test suite
source="$pkgname-$pkgver.tar.gz::https://github.com/ar-/incron/archive/refs/tags/$pkgver.tar.gz
	incrond.initd
	gcc11.patch
	"

build() {
	make PREFIX=/usr
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
	install -Dm755 "$srcdir"/incrond.initd "$pkgdir"/etc/init.d/incrond
	install -Dm644 incron.conf.example "$pkgdir"/etc/incron.conf
}

sha512sums="
0e5f167e60de9048df4566868b4d5e8cc54cd55c33edcaf0a2b022965fc524314c6699f5e51eebbbf3369671d5fa86aad63e5509558b65e80a9685722804254c  incron-0.5.12.tar.gz
458d5a4e9ab062b3e9a7dddf46c25bae431ec6c93862304f444e94cfb41b28e9ae21d5e621e94ce9cf55b26878d8fe978c19eeaa473779772a24adf709fd4cd8  incrond.initd
c1d0891b238c60cba9b8e910b6e3218610d93a2707267cd2b799232b93dc4fa0bfab97c0ba093104d2188bc0e991fecdd161e92bc655e9633eb32d8e8d4c0300  gcc11.patch
"
